import cookie from './library/cookie.js';
import $ from './library/jquery.js';


$(function() {
    if (cookie.get('shop') && cookie.get('shop') != 'null') {
        cookie.remove('shop');
    }
    //登录方式切换
    $('.login>div>a').on('click', function() {
        $(this).addClass('bot');
        $(this).siblings().removeClass('bot');
        if ($(this).hasClass('pw-login')) {
            $('.name>img').attr('src', '../img/name.png');
            $('.pwd>img').attr('src', '../img/pwd.png');
            $('#phone').css('display', 'none');
            $('.name>input').css('text-indent', 10);
            $('.name>input').attr('placeholder', '会员名/邮箱/手机号');
            $('.pwd>input').attr('placeholder', '请输入登录密码');
            $('.pwd>span').css('display', 'none');
            $('.log-bot>a:not(:first-child)').css('display', 'block');
        } else {
            $('.name>img').attr('src', '../img/p22.png');
            $('.pwd>img').attr('src', '../img/pwd2.png');
            $('#phone').css('display', 'block');
            $('.name>input').css('text-indent', 70);
            $('.name>input').attr('placeholder', '请输入手机号');
            $('.pwd>input').attr('placeholder', '请输入验证码');
            $('.pwd>span').css('display', 'block');
            $('.log-bot>a:not(:first-child)').css('display', 'none');
        }
    })

})